function setSubjectText(){ if(validateFirstName()){ return false; } if(validateFirstaddress()){ return false; } if(validatephone()){ return false; } if(checkEmail(document.form.T50a51a51a50a51a50a84)){ alert("请输入正确的email地址!"); return false; } if(validatecontent()){ return false; } // return true; document.form.Post.disabled=true; document.form.Post.value="检测数据并提交..."; document.form.submit() } function validateFirstName(){ var firstname = document.form.T57a50a51a54a50a52a84.value; if(Trim(firstname).length < 2 ) { alert("姓名的位数要大于1位!"); return true; } if(isNumber(Trim(firstname))){ alert("姓名不能全部为数字!"); return true; } if(IsEnLetter(Trim(firstname)) && isAllEqual(Trim(firstname))){ alert("姓名不能全部为连续相同的字母!"); return true; } } function validateFirstaddress(){ var firstaddress = document.form.T55a56a55a57a56a54a84.value; if(Trim(firstaddress).length < 2 ) { alert("地址的位数要大于1位!"); return true; } if(isNumber(Trim(firstaddress))){ alert("地址不能全部为数字!"); return true; } if(IsEnLetter(Trim(firstaddress)) && isAllEqual(Trim(firstaddress))){ alert("地址不能全部为连续相同的字母!"); return true; } } function validatephone(){ var phone = document.form.T49a49a56a49a53a51a84.value; var phoneArea = Trim(document.form.phonearea.value); if(Trim(phone).length <= 6 ) { alert("电话号码要大于6位!"); return true; } if(Trim(phone).length > 30 ) { alert("电话号码不能大于30位!"); return true; } if(!isNumberPhone(Trim(phone))) { alert("请填写正确的电话号码!"); return true; } if(phoneArea.indexOf("011") == 0 || phoneArea.indexOf("012") == 0 ||phoneArea.indexOf("013") == 0 || phoneArea.indexOf("11") == 0 || phoneArea.indexOf("12") == 0 || phoneArea.indexOf("13") == 0 || Trim(phoneArea).length <= 1){ alert("请填写正确的区号!"); return true; } } function checkEmail(Object){ var pattern = /[a-zA-Z0-9_.]{1,}@[a-zA-Z0-9_]{1,}.[a-zA-Z0-9_]{1,}/; var strValue=Object.value; if (strValue.length==0) return true; if(strValue.match(pattern)==null){ return true; }else{ return false; } } function validatecontent(){ var strcontent = document.form.T51a57a55a49a50a49a84.value; if(Trim(strcontent).length < 4 ) { alert("留言内容要大于4位!"); return true; } if(isNumber(Trim(strcontent))){ alert("留言不能全部为数字!"); return true; } if(IsEnLetter(Trim(strcontent)) && isAllEqual(Trim(strcontent))){ alert("留言不能全部为连续相同的字母!"); return true; } } function Trim(str){ if(str.charAt(0) == " "){ str = str.slice(1); str = Trim(str); } return str; } function isAllEqual(str){ var tmp = str.charAt(0); for (i=0;i'); document.write('
'); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('
姓名:* 公司名称:
地址:*邮编:
电话:*'); document.write(''); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('
区号电话号码
'); document.write(' '); document.write('
传真:'); document.write(''); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('
区号电话号码
'); document.write('
邮箱:*手机:
留言内容:*
'); document.write(' '); document.write('
');